package main

/*import (
	_ "fmt"
	"fmt"
	"strconv"
	"time"
)

func test_Routine(){
	fmt.Println("Routine...")
}

func Add(x, y int, ch chan int) {
	fmt.Println(x + y)

	ch <- 1
}

func Read(ch chan int){
	value := <-ch

	fmt.Println("value:" + strconv.Itoa(value))
}

func  Write(ch chan int){
	ch <- 10
}

var ch chan int

func test_channel(){
	ch <-1
	fmt.Println("This is goroutine")
}

func main(){

	//ch := make(chan int)
	//
	//go Read(ch)
	//go Write(ch)
	//time.Sleep(2)

	//go test_Routine()
	//fmt.Println("This is main")
	//
	//

	//chs := make([]chan int, 10)
	//
	//for i := 0; i < 10 ; i++  {
	//	chs[i] = make(chan int)
	//	go Add(i, i, chs[i])
	//}
	//
	//for _,v :=range chs {
	//	<-v
	//}
	//time.Sleep(2)

	ch = make(chan int, 1)
	go test_channel()

	time.Sleep(1)

	fmt.Println("This is main")
}*/